package day34;

// 养兔子
// 其实就类似于fib
//    day: 0 1 2 3 4 5 ...
// rabbit: 1 1 2 3 5 8 ...

import java.util.Scanner;

public class Main2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextInt()) {
            int num = in.nextInt();
            if(num>=1 && num<=90) {
                // 注意累加数会很大，注意选择long数据类型
                long first = 1;
                long second = 1;
                long rabbit = 1;
                for (int i = 2; i <= num; i++) {
                    rabbit = first + second;
                    first = second;
                    second = rabbit;
                }
                System.out.println(rabbit);
            }
        }
    }
}
